import 'package:riki_router/riki_router.dart';

class Demo3Arg {
  final String arg1;
  final int arg2;
  final bool arg3;
  final List<String> arg4;
  final Map<String, dynamic> arg5;

  Demo3Arg(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5);

  @override
  String toString() {
    return 'Demo3Arg{arg1: $arg1, arg2: $arg2, arg3: $arg3, arg4: $arg4, arg5: $arg5}';
  }

  factory Demo3Arg.fromJson(Map<dynamic, dynamic> json) => Demo3Arg(
        json['arg1'] ?? '',
        json['arg2'] ?? 0,
        json['arg3'] ?? false,
        (json['arg4'] ?? []).cast<String>(),
        json['arg5'] ?? {},
      );

  Map<String, dynamic> toJson() => <String, dynamic>{
        'arg1': arg1,
        'arg2': arg2,
        'arg3': arg3,
        'arg4': arg4,
        'arg5': arg5,
      };
}
